apply plugin: 'com.android.application'

android {
	namespace  'AE.RmG.Device'
	compileSdk 34

	compileOptions {
		sourceCompatibility JavaVersion.VERSION_1_8
		targetCompatibility JavaVersion.VERSION_1_8
	}

	defaultConfig {
		applicationId 		'AE.RmG.Device'
		minSdkVersion 		24 // 24+ for vulkan
		targetSdkVersion 	34

		ndk {
			abiFilters "arm64-v8a", "armeabi-v7a" //, "x86", "x86_64"
		}
		externalNativeBuild {
			cmake {
				arguments '-DANDROID_STL=c++_static',  // see https://developer.android.com/ndk/guides/cpp-support#static_runtimes
						  '-DANDROID_ARM_NEON=ON',
						  '-DAE_ENABLE_VULKAN=ON'
			}
		}
	}

	buildTypes {
		release {
			//debuggable true // to enable logcat in release
			minifyEnabled = false
			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
			signingConfig signingConfigs.debug
		}
	}

    ndkVersion "26.3.11579264"

	externalNativeBuild {
		cmake {
			version '3.26.4'
			path	'../../CMakeLists.txt'
		}
	}
	packagingOptions {
		jniLibs {
			excludes   += ['lib/**/*.so']
			pickFirsts += ['lib/**/libRemoteGraphicsDevice.so']
			pickFirsts += ['lib/**/libVkLayer_khronos_validation.so']
		}
		resources  {
			excludes += '**/*.kotlin_*'
		}
	}
}

dependencies {
	implementation project(path: ':engine')
	implementation 'androidx.appcompat:appcompat:1.6.1'
	implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
